#ifndef __PTHREADINTERFACELOCK_H__
#define __PTHREADINTERFACELOCK_H__

#include "base/threads/PthreadInterface.h"
#include "util/Pool.h"

class PthreadInterfaceLock : public PthreadInterface {
  public:
    NEW_DELETE_OPERATORS_H(PthreadInterfaceLock,PthreadInterface);
    PthreadInterfaceLock ();
    ~PthreadInterfaceLock ();
    virtual int mutex_lock (pthread_mutex_t* lock);
    virtual int mutex_unlock (pthread_mutex_t* lock);
    virtual int mutex_trylock (pthread_mutex_t* lock);
    virtual int rwlock_rdlock (volatile pthread_rwlock_t* lock);
    virtual int rwlock_wrlock (volatile pthread_rwlock_t* lock);
    virtual int rwlock_unlock (pthread_rwlock_t* lock);
    virtual int cond_wait (pthread_cond_t* cond, pthread_mutex_t* lock);
    virtual int key_create (pthread_key_t* key, void (*destructor)(void*));
    virtual int barrier_wait (pthread_barrier_t* barrier);
};
#endif //  __PTHREADINTERFACELOCK_H__
